package de.rotkiv;

import java.awt.Component;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;

import de.rotkiv.common.resourcebundle.I18n;
import de.rotkiv.playlistgenerator.DC_PlaylistGenerator;


public class PlaylistGeneratorApp extends JPanel  {


	private static final long serialVersionUID = -6527664006644893699L;


	public static void main(String[] args) {
		//Schedule a job for the event dispatch thread:
		//creating and showing this application's GUI.
		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				createAndShowGUI();
			}
		});
	}



	/**
	 * Create the GUI and show it.  For thread safety,
	 * this method should be invoked from the
	 * event dispatch thread.
	 */
	private static void createAndShowGUI() {
		//Create and set up the window.
		JFrame frame = new JFrame(I18n.TEXT_TITEL);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		//Add contents to the window.
		DC_PlaylistGenerator controller = new DC_PlaylistGenerator();
		Component comp = controller.getDialog();
		frame.add(comp);
		frame.setPreferredSize(new Dimension(800, 500));

		frame.addWindowListener(controller);

		//Display the window.
		frame.pack();
		frame.setVisible(true);
	}



}
